Integrand size = 10, antiderivative size = 54 \[ \int x \cosh \left ((a+b x)^2\right ) \, dx=-\frac {a \sqrt {\pi } \text {erf}(a+b x)}{4 b^2}-\frac {a \sqrt {\pi } \text {erfi}(a+b x)}{4 b^2}+\frac {\sinh \left ((a+b x)^2\right )}{2 b^2} \]
Time = 0.03 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.72 \[ \int x \cosh \left ((a+b x)^2\right ) \, dx=\frac {-a \sqrt {\pi } (\text {erf}(a+b x)+\text {erfi}(a+b x))+2 \sinh \left ((a+b x)^2\right )}{4 b^2} \]
Time = 0.29 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.91, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {5888, 25, 7293, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int x \cosh \left ((a+b x)^2\right ) \, dx\) |
\(\Big \downarrow \) 5888 |
\(\displaystyle \frac {\int b x \cosh \left ((a+b x)^2\right )d(a+b x)}{b^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\int -b x \cosh \left ((a+b x)^2\right )d(a+b x)}{b^2}\) |
\(\Big \downarrow \) 7293 |
\(\displaystyle -\frac {\int \left (a \cosh \left ((a+b x)^2\right )-(a+b x) \cosh \left ((a+b x)^2\right )\right )d(a+b x)}{b^2}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {-\frac {1}{4} \sqrt {\pi } a \text {erf}(a+b x)-\frac {1}{4} \sqrt {\pi } a \text {erfi}(a+b x)+\frac {1}{2} \sinh \left ((a+b x)^2\right )}{b^2}\) |
3.1.55.3.1 Defintions of rubi rules used
Int[((a_.) + Cosh[(c_.) + (d_.)*(u_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbo l] :> Simp[1/Coefficient[u, x, 1]^(m + 1) Subst[Int[(x - Coefficient[u, x , 0])^m*(a + b*Cosh[c + d*x^n])^p, x], x, u], x] /; FreeQ[{a, b, c, d, n, p }, x] && LinearQ[u, x] && NeQ[u, x] && IntegerQ[m]
Result contains complex when optimal does not.
Time = 0.05 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.22
method | result | size |
risch | \(-\frac {{\mathrm e}^{-\left (b x +a \right )^{2}}}{4 b^{2}}-\frac {a \,\operatorname {erf}\left (b x +a \right ) \sqrt {\pi }}{4 b^{2}}+\frac {{\mathrm e}^{\left (b x +a \right )^{2}}}{4 b^{2}}+\frac {i a \sqrt {\pi }\, \operatorname {erf}\left (i x b +i a \right )}{4 b^{2}}\) | \(66\) |
-1/4/b^2*exp(-(b*x+a)^2)-1/4*a*erf(b*x+a)*Pi^(1/2)/b^2+1/4/b^2*exp((b*x+a) ^2)+1/4*I*a/b^2*Pi^(1/2)*erf(I*x*b+I*a)
Leaf count of result is larger than twice the leaf count of optimal. 261 vs. \(2 (44) = 88\).
Time = 0.26 (sec) , antiderivative size = 261, normalized size of antiderivative = 4.83 \[ \int x \cosh \left ((a+b x)^2\right ) \, dx=\frac {b \cosh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )^{2} + \sqrt {\pi } \sqrt {-b^{2}} {\left (a \cosh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right ) + a \sinh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )\right )} \operatorname {erf}\left (\frac {\sqrt {-b^{2}} {\left (b x + a\right )}}{b}\right ) - \sqrt {\pi } \sqrt {b^{2}} {\left (a \cosh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right ) + a \sinh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )\right )} \operatorname {erf}\left (\frac {\sqrt {b^{2}} {\left (b x + a\right )}}{b}\right ) + 2 \, b \cosh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right ) \sinh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right ) + b \sinh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )^{2} - b}{4 \, {\left (b^{3} \cosh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right ) + b^{3} \sinh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )\right )}} \]
1/4*(b*cosh(b^2*x^2 + 2*a*b*x + a^2)^2 + sqrt(pi)*sqrt(-b^2)*(a*cosh(b^2*x ^2 + 2*a*b*x + a^2) + a*sinh(b^2*x^2 + 2*a*b*x + a^2))*erf(sqrt(-b^2)*(b*x + a)/b) - sqrt(pi)*sqrt(b^2)*(a*cosh(b^2*x^2 + 2*a*b*x + a^2) + a*sinh(b^ 2*x^2 + 2*a*b*x + a^2))*erf(sqrt(b^2)*(b*x + a)/b) + 2*b*cosh(b^2*x^2 + 2* a*b*x + a^2)*sinh(b^2*x^2 + 2*a*b*x + a^2) + b*sinh(b^2*x^2 + 2*a*b*x + a^ 2)^2 - b)/(b^3*cosh(b^2*x^2 + 2*a*b*x + a^2) + b^3*sinh(b^2*x^2 + 2*a*b*x + a^2))
\[ \int x \cosh \left ((a+b x)^2\right ) \, dx=\int x \cosh {\left (a^{2} + 2 a b x + b^{2} x^{2} \right )}\, dx \]
Leaf count of result is larger than twice the leaf count of optimal. 650 vs. \(2 (44) = 88\).
Time = 0.40 (sec) , antiderivative size = 650, normalized size of antiderivative = 12.04 \[ \int x \cosh \left ((a+b x)^2\right ) \, dx=\frac {1}{2} \, x^{2} \cosh \left ({\left (b x + a\right )}^{2}\right ) - \frac {1}{4} \, {\left (\frac {{\left (\frac {\sqrt {\pi } {\left (b^{2} x + a b\right )} a^{2} b^{3} {\left (\operatorname {erf}\left (\frac {\sqrt {{\left (b^{2} x + a b\right )}^{2}}}{b}\right ) - 1\right )}}{\sqrt {{\left (b^{2} x + a b\right )}^{2}} \left (-b^{2}\right )^{\frac {5}{2}}} - \frac {{\left (b^{2} x + a b\right )}^{3} b^{3} \Gamma \left (\frac {3}{2}, \frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}{{\left ({\left (b^{2} x + a b\right )}^{2}\right )}^{\frac {3}{2}} \left (-b^{2}\right )^{\frac {5}{2}}} + \frac {2 \, a b^{3} e^{\left (-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}}{\left (-b^{2}\right )^{\frac {5}{2}}}\right )} a}{\sqrt {-b^{2}}} + \frac {{\left (\frac {\sqrt {\pi } {\left (b^{2} x + a b\right )} a^{3} b^{4} {\left (\operatorname {erf}\left (\frac {\sqrt {{\left (b^{2} x + a b\right )}^{2}}}{b}\right ) - 1\right )}}{\sqrt {{\left (b^{2} x + a b\right )}^{2}} \left (-b^{2}\right )^{\frac {7}{2}}} - \frac {3 \, {\left (b^{2} x + a b\right )}^{3} a b^{4} \Gamma \left (\frac {3}{2}, \frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}{{\left ({\left (b^{2} x + a b\right )}^{2}\right )}^{\frac {3}{2}} \left (-b^{2}\right )^{\frac {7}{2}}} + \frac {3 \, a^{2} b^{4} e^{\left (-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}}{\left (-b^{2}\right )^{\frac {7}{2}}} + \frac {b^{4} \Gamma \left (2, \frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}{\left (-b^{2}\right )^{\frac {7}{2}}}\right )} b}{\sqrt {-b^{2}}} + \frac {a {\left (\frac {\sqrt {\pi } {\left (b^{2} x + a b\right )} a^{2} {\left (\operatorname {erf}\left (\sqrt {-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}}\right ) - 1\right )}}{b^{3} \sqrt {-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}}} - \frac {2 \, a e^{\left (\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}}{b^{2}} - \frac {{\left (b^{2} x + a b\right )}^{3} \Gamma \left (\frac {3}{2}, -\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}{b^{5} \left (-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )^{\frac {3}{2}}}\right )}}{b} - \frac {\sqrt {\pi } {\left (b^{2} x + a b\right )} a^{3} {\left (\operatorname {erf}\left (\sqrt {-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}}\right ) - 1\right )}}{b^{4} \sqrt {-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}}} + \frac {3 \, a^{2} e^{\left (\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}}{b^{3}} - \frac {\Gamma \left (2, -\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}{b^{3}} + \frac {3 \, {\left (b^{2} x + a b\right )}^{3} a \Gamma \left (\frac {3}{2}, -\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )}{b^{6} \left (-\frac {{\left (b^{2} x + a b\right )}^{2}}{b^{2}}\right )^{\frac {3}{2}}}\right )} b \]
1/2*x^2*cosh((b*x + a)^2) - 1/4*((sqrt(pi)*(b^2*x + a*b)*a^2*b^3*(erf(sqrt ((b^2*x + a*b)^2)/b) - 1)/(sqrt((b^2*x + a*b)^2)*(-b^2)^(5/2)) - (b^2*x + a*b)^3*b^3*gamma(3/2, (b^2*x + a*b)^2/b^2)/(((b^2*x + a*b)^2)^(3/2)*(-b^2) ^(5/2)) + 2*a*b^3*e^(-(b^2*x + a*b)^2/b^2)/(-b^2)^(5/2))*a/sqrt(-b^2) + (s qrt(pi)*(b^2*x + a*b)*a^3*b^4*(erf(sqrt((b^2*x + a*b)^2)/b) - 1)/(sqrt((b^ 2*x + a*b)^2)*(-b^2)^(7/2)) - 3*(b^2*x + a*b)^3*a*b^4*gamma(3/2, (b^2*x + a*b)^2/b^2)/(((b^2*x + a*b)^2)^(3/2)*(-b^2)^(7/2)) + 3*a^2*b^4*e^(-(b^2*x + a*b)^2/b^2)/(-b^2)^(7/2) + b^4*gamma(2, (b^2*x + a*b)^2/b^2)/(-b^2)^(7/2 ))*b/sqrt(-b^2) + a*(sqrt(pi)*(b^2*x + a*b)*a^2*(erf(sqrt(-(b^2*x + a*b)^2 /b^2)) - 1)/(b^3*sqrt(-(b^2*x + a*b)^2/b^2)) - 2*a*e^((b^2*x + a*b)^2/b^2) /b^2 - (b^2*x + a*b)^3*gamma(3/2, -(b^2*x + a*b)^2/b^2)/(b^5*(-(b^2*x + a* b)^2/b^2)^(3/2)))/b - sqrt(pi)*(b^2*x + a*b)*a^3*(erf(sqrt(-(b^2*x + a*b)^ 2/b^2)) - 1)/(b^4*sqrt(-(b^2*x + a*b)^2/b^2)) + 3*a^2*e^((b^2*x + a*b)^2/b ^2)/b^3 - gamma(2, -(b^2*x + a*b)^2/b^2)/b^3 + 3*(b^2*x + a*b)^3*a*gamma(3 /2, -(b^2*x + a*b)^2/b^2)/(b^6*(-(b^2*x + a*b)^2/b^2)^(3/2)))*b
Result contains complex when optimal does not.
Time = 0.27 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.83 \[ \int x \cosh \left ((a+b x)^2\right ) \, dx=-\frac {-\frac {i \, \sqrt {\pi } a \operatorname {erf}\left (i \, b {\left (x + \frac {a}{b}\right )}\right )}{b} - \frac {e^{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}}{b}}{4 \, b} + \frac {\frac {\sqrt {\pi } a \operatorname {erf}\left (-b {\left (x + \frac {a}{b}\right )}\right )}{b} - \frac {e^{\left (-b^{2} x^{2} - 2 \, a b x - a^{2}\right )}}{b}}{4 \, b} \]
-1/4*(-I*sqrt(pi)*a*erf(I*b*(x + a/b))/b - e^(b^2*x^2 + 2*a*b*x + a^2)/b)/ b + 1/4*(sqrt(pi)*a*erf(-b*(x + a/b))/b - e^(-b^2*x^2 - 2*a*b*x - a^2)/b)/ b
Timed out. \[ \int x \cosh \left ((a+b x)^2\right ) \, dx=\int x\,\mathrm {cosh}\left ({\left (a+b\,x\right )}^2\right ) \,d x \]